import request from "@/utils/request";

export function getAlbumInfo(albumId) {
    return request({
        url:'/admin/photos/albums/' + albumId + '/info',
        method:'get'
    })
}

export function listAlbums() {
    return request({
        url:'/admin/photos/albums/info',
        method:'get'
    })
}

export function listPhotos(param) {
    return request({
        url:'/admin/photos',
        method:'get',
        params:param
    })
}

export  function savePhotos(data){
    return request({
        url:'/admin/photos',
        method:'post',
        data:data
    })
}

export function updatePhoto(data) {
    return request({
        url:'/admin/photos',
        method:'put',
        data:data
    })
}

export function updatePhotoAlbum(data) {
    return request({
        url:'/admin/photos/album',
        method:'put',
        data:data
    })
}

export function updatePhotoDelete(id){
    return request({
        url:'/admin/photos/delete',
        method:'put',
        data:id
    })
}
